/* $Header: sampler.c,v 2.7 05/03/02 11:28:19 przybyls Exp $ */

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991                 */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:  sampler.c                                             */
/* ============                                                        */
/*                                                                     */
/* Author:  Tom Przybylski                                             */
/*                                                                     */
/* MODULE PURPOSE:                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/

#include <typedefs.h>
#include <error.h>
#include <mio.h>
#include <cmd_set.h>
#include <als.h>
#include <sampler.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/


/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/

#pragma  SECTION UDATA=pfail

   ALS_TBL      TowerF;
   ALS_TBL      TowerB;
   TOWER_TBL    Tower1;
   TOWER_TBL    Tower2;

   BIT8         Swapped;
   BIT8         Tray_Enabled;
   BIT8         BCR_Enabled;
   BIT8         Enable3of9;
   BIT8         Enable2of5;
   BIT8         EnableUPC;
   BIT8         EnableChk;
   INT8         BCRpos;
   TRAY_TYPE    Tray_Type;

   BIT8         Enable_Solv_Save;
   U_INT8       Host_Control;

   BIT8         Barcode[MAX_BARCODE+1];

   INT16        BtlInClaw;
   INT16        BCRbtlnum;

   INT16        Z_Delta;
   INT16        F_T_Delta;
   INT16        B_T_Delta;

#pragma  SECTION UNDO

   BIT8         Tray;
   INT8         BCR_Type;
   INT8         Tray_C_State;
   BIT8         Tray_Have_Config;
   U_INT16      Tray_Max_Bottle;
   U_INT32      Tray_C_Timer;
   U_INT32      Init_Timer;

   BIT8         Als_Power_Supply;
   BIT8         Inj_Status;
   U_INT8       Inject_State;
   BIT8         Tray_Active;
   BIT8         BCR_Active;
   BIT8         Injector_Overlap;
   BIT8         Watch_InjectorF;
   BIT8         Watch_InjectorB;
   BIT8         Watch_Tray;

   BIT8         Tray_Busy;
   INT8         Tray_State;
   INT8         BCR_State;
   BIT8         Move_Request;
   BIT8         RtnAll_Request;
   BIT8         Bcr_Request;
   BIT8         Tray_Reply;
   BIT8         Get_Not_Put;
   BIT8         Inject_Done;
   BIT8         Move_Done;
   BIT8         RtnAll_Done;
   BIT8         Bcr_Done;
   BIT8         Update_Bcr;
   MOVESTATE    Move_State;
   GETPUTSTATE  GetPut_State;
   RTNALLSTATE  RtnAll_State;
   TRAYPOSSTATE TrayPos_State;
   RBCRSTATE    ReadBcr_State;
   MIXSTATE     Mix_State;
   BTLLOC_T     Move_From;
   BTLLOC_T     Move_To;
  pBTLLOC_T     GetPut_Loc;
  pALS_TBL      GetPut_Als;
   U_INT16      Tray_Error;
   INT16        Tpos;

   BTL_DEST     Bcr_From_Dest;
   BTL_DEST     Bcr_To_Dest;
   INT32        Bcr_From;
   INT32        Bcr_To;

   BIT8         Headspace;
   BIT8         Try_Headspace_Next;

